class UrlMappings {

	static mappings = {



		"/mainPage/$action"(controller:"mainPage"){ view:"/index" }

		"/login/$action"(controller:"login"){ view:"/index" }

		"/user/$action?/$id?"(controller:"user"){
			constraints {
				[GET: "show", PUT: "update", DELETE: "delete", POST:"save"]
			}
		}

		"/offer/$action?/$id?"(controller:"offer"){
			constraints {
				[GET: "show", PUT: "update", DELETE: "delete", POST:"save"]
			}
		}

		"/rest/$id?" (controller: "rest") { [GET: "getrest"] }

		"/store/$action?/$id?"(controller:"store"){
			constraints {
				[GET: "show", PUT: "update", DELETE: "delete", POST:"save"]
			}
		}



		"/"(view:"/index")
		"500"(view:'/error')
	}
}
